-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libroach/engine: plumb support for SingleDelete operation #33440
libroach/engine: plumb support for SingleDelete operation #33440
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 13 of 13 files at r1.
Reviewable status: complete! 0 of 0 LGTMs obtained
c-deps/libroach/batch.cc, line 89 at r1 (raw file):
break; } case rocksdb::kSingleDeleteRecord:
Can you give more detail on the outcome here? Does this mean that after a SingleDelete, the "deleted" value remains visible? I see that the code is simple in this case, but is this really sane?
c-deps/libroach/batch.cc, line 91 at r1 (raw file):
case rocksdb::kSingleDeleteRecord: // These semantics don't quite mirror SingleDelete's expected // implementation, but they don't violate the its contract from
the its
pkg/storage/engine/rocksdb.go, line 796 at r1 (raw file):
} // Clear removes the most recent item from the db with the given key.
SingleClear
6492023
to
cfc001a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained
c-deps/libroach/batch.cc, line 89 at r1 (raw file):
Previously, tbg (Tobias Grieger) wrote…
Can you give more detail on the outcome here? Does this mean that after a SingleDelete, the "deleted" value remains visible? I see that the code is simple in this case, but is this really sane?
Done. It actually means that the SingleDelete is treated like a standard Delete operation (we're in C++, so the fallthrough is implicit).
c-deps/libroach/batch.cc, line 91 at r1 (raw file):
Previously, tbg (Tobias Grieger) wrote…
the its
Done.
pkg/storage/engine/rocksdb.go, line 796 at r1 (raw file):
Previously, tbg (Tobias Grieger) wrote…
SingleClear
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r2.
Reviewable status: complete! 1 of 0 LGTMs obtained
c-deps/libroach/batch.cc, line 89 at r1 (raw file):
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Done. It actually means that the SingleDelete is treated like a standard Delete operation (we're in C++, so the fallthrough is implicit).
Ah, makes sense, thanks.
c-deps/libroach/batch.cc, line 92 at r2 (raw file):
// Treating a SingleDelete operation as a standard Delete doesn't // quite mirror SingleDelete's expected implementation, but it // don't violate the operation's contract:
nit: doesn't ;-)
Informs cockroachdb#8979. This commit doesn't actually use the operation yet, but any experiments will require this plumbing, so it made sense to pull it out and properly test it. Release note: None
cfc001a
to
45c072a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really dislike how we translate from Clear
-> Delete
when going from CRDB to RocksDB. Peer ack for whoever fixes this.
Reviewable status: complete! 1 of 0 LGTMs obtained (and 1 stale)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TFTR!
bors r+
Reviewable status: complete! 1 of 0 LGTMs obtained (and 1 stale)
c-deps/libroach/batch.cc, line 92 at r2 (raw file):
Previously, tbg (Tobias Grieger) wrote…
nit: doesn't ;-)
lol, that don't sound wrong to me... done.
I was talking to @benesch about this today. I guess the idea is that in CRDB code "delete" implies MVCC-awareness (i.e. leaving tombstones) while "clear" doesn't. I don't really like it either so if you're on board I'd happily switch it over. Just give the 👍. |
The current situation is very confusing. |
Merge conflict (retrying...) |
33436: cli/interactive_tests: unskip test_url_db_override r=knz a=knz Fixes #30796. ... and use a more clearly guaranteed-bad DNS name for the expected failure. Suggested by @petermattis. Release note: None 33440: libroach/engine: plumb support for SingleDelete operation r=nvanbenschoten a=nvanbenschoten Informs #8979. This commit doesn't actually use the operation yet, but any experiments will require this plumbing, so it made sense to pull it out and properly test it. Release note: None Co-authored-by: Raphael 'kena' Poss <[email protected]> Co-authored-by: Nathan VanBenschoten <[email protected]>
Build succeeded |
Informs #8979.
This commit doesn't actually use the operation yet, but any experiments
will require this plumbing, so it made sense to pull it out and properly
test it.
Release note: None